#ifndef VISCAMCONTROLLER_H
#define VISCAMCONTROLLER_H

#include "OISKeyboard.h"
#include "OISMouse.h"
#include <OgreVector3.h>

namespace Ogre
{
    class Camera;
};

class VisCamController : public OIS::KeyListener, public OIS::MouseListener
{
public:
    VisCamController(Ogre::Camera *cam);
    void update(double timeSinceLastFrame);
protected:
    bool keyPressed(const OIS::KeyEvent &evt);
    bool keyReleased(const OIS::KeyEvent &evt);
    bool mouseMoved(const OIS::MouseEvent &evt);
    bool mousePressed(const OIS::MouseEvent &evt, OIS::MouseButtonID id);
    bool mouseReleased(const OIS::MouseEvent &evt, OIS::MouseButtonID id);
private:
    Ogre::Camera *camera;
    Ogre::Vector3 camAcceleration, camVelocity;
    Ogre::Real topSpeed;
    bool goingLeft,goingRight,goingForward,goingBack,goingUp,goingDown;
    OIS::KeyCode forwardKey,backwardKey,leftKey,rightKey,upKey,downKey,fastKey;
};

#endif
